package product

import (
	"github.com/gin-gonic/gin"
	"wx-uniapp-go/internal/logic/product_logic"
	"wx-uniapp-go/internal/server/echo"
)

// ListModels 获取商品模块列表
func ListModels(c *gin.Context) {
	ctx := echo.TraceCtx(c)

	resp, err := product_logic.NewProductLogic(ctx).ListModel()
	if err != nil {
		echo.Fail(c).Error(err)
		return
	}

	echo.Success(c, resp)
}
